1. Field of the Invention
The present invention relates to an audio reproduction circuit for reproducing voice data compressed by MP3 (MPEG audio layer 3) or another such standard, and more particularly to a way of dealing with cut-out which could occur during voice reproduction.
2. Description of the Related Art
FIG. 2 of the accompanying drawings illustrates an example of a conventional audio reproduction circuit 10.
The audio reproduction circuit 10 is installed, for example, in a mobile telephone or other such portable device. The audio reproduction circuit 10 is connected via a system bus 2 to a CPU (central processing unit) 1 that performs overall control on the mobile telephone (or other such portable device). The audio reproduction circuit 10 decodes MP3 data DAT given by the CPU 1, and converts the data into an audio signal AUD. The MP3 data DAT is managed by an MP3 data file 3 connected to the CPU 1. The audio signal AUD produced by the audio reproduction circuit 10 is issued as an acoustic signal (sound) from a speaker (or speakers) 4.
The audio reproduction circuit 10 has a control register 11 for the transfer of various kinds of control information and status information to and from the CPU 1, and for performing management of status within the audio reproduction circuit 10. The audio reproduction circuit 10 also has an input buffer 12 for temporarily holding MP3 data DAT provided by the CPU 1. An MP3 decoder 13 is connected to the input buffer 12. The input buffer 12 writes the quantity QUI of MP3 data DAT remaining in the buffer to the control register 11.
The MP3 decoder 13 reads the MP3 data DAT from the input buffer 12 in 576 data units called granules according to a relatively high-speed clock signal CK1, and converts the data into PCM (pulse code modulation) voice data VOI, for example. The MP3 decoder 13 writes the voice data VOI to an output buffer 14 every time one granule of MP3 data DAT is decoded. Upon reading the header information HDR of the MP3 data DAT, the MP3 decoder 13 writes the header information HDR to the control register 11.
The output buffer 14 temporarily holds the voice data VOI converted by the MP3 decoder 13, and writes the quantity QUO of voice data VOI remaining in the output buffer to the control register 11. The output buffer 14 is connected to a volume adjuster 15 that reads the voice data VOI at a specific timing and adjusts the volume according to a volume control signal CON provided by the control register 11. The volume control signal CON is given from the CPU 1 to the control register 11.
The volume adjuster 15 is also connected to a digital-analog converter (DAC) 16 that converts the volume-adjusted voice data VOI into the analog audio signal AUD, and the digital-analog converter 16 is connected to a speaker (or speakers) 4 that converts the audio signal AUD into an acoustic signal (sound). The acoustic signal is issued from the speaker(s) 4.
A clock signal CK2 for audio signal reproduction is provided from a timing generator 17 to the volume adjuster 15 and the digital-analog converter 16. The timing generator 17 generates the clock signal CK2 using a system clock or the like on the basis of the header information HDR of the MP3 data held in the control register 11.
The operation of the audio reproduction circuit 10 and CPU 1 will now be described.
When music or the like is generated (reproduced), the CPU 1 writes the MP3 data DAT to the input buffer 12 of the audio reproduction circuit 10. Once the input buffer 12 holds one granule of the MP3 data DAT, the MP3 data DAT in the input buffer 12 is read by the MP3 decoder 13, and decoding begins.
If header information HDR is included in the MP3 data DAT, the MP3 decoder 13 writes the header information HDR to the control register 11. Once the decoding of one granule of MP3 data is complete, the MP3 decoder 13 writes the resulting voice data VOI to the output buffer 14.
The timing generator 17 generates the clock signal CK2 on the basis of a sampling frequency SMP stored in the control register 11, and provides the clock signal CK2 to the volume adjuster 15 and the digital-analog converter 16. The volume adjuster 15 sequentially reads the voice data VOI from the output buffer 14 in synchronization with the clock signal CK2, and adjusts the volume of the voice data VOI according to the volume control signal CON given to the control register 11. The volume-adjusted voice data VOI is converted into the analog audio signal AUD by the digital-analog converter 16, and is issued as an acoustic signal from the speaker(s) 4.
The CPU 1 monitors the quantity QUI of MP3 data DAT remaining in the input buffer 12 and the quantity QUO of voice data VOI remaining in the output buffer 14 via the control register 11, and suitably replenishes the data in the input buffer 12 with the next MP3 data DAT in order to continuously generate an acoustic signal without cut-out (or dropout or audio discontinuity).
Such a conventional audio reproduction circuit is disclosed in, for example, Japanese Patent Application Kokai (Laid open) publication No. 2005-346838.
The following problems are encountered with the above-described audio reproduction circuit.
The CPU 1 must confirm the quantity QUI of MP3 data DAT remaining in the input buffer 12 and the quantity QUO of voice data VOI remaining in the output buffer 14 via the control register 11, and replenish the data in the input buffer 12 with the next MP3 data DAT. When there is no more voice data VOI in the output buffer 14, and there is an obvious occurrence of what is known as “cut-out,” in which the audio reproduction suddenly comes to a halt, a fade-out or other such volume control signal CON that gradually reduces the volume must be sent from the CPU 1 to the control register 11.
However, in the case of a portable telephone, for example, the main job of the CPU 1 is not audio reproduction, but speech control. Thus, it is difficult for the CPU 1 to replenish the data and/or send a volume control signal appropriately by always monitoring the remaining amounts of particular data in the input and output buffers. Consequently, the timing of this monitoring may become delayed, thereby causing cut-out to occur. Increasing the capacity of the input buffer 12 is one possible way to avoid the occurrence of this cut-out, but it is often difficult to ensure adequate memory with a low-cost portable terminal. Also, since the processing of the MP3 decoder 13 is carried out in granule units, it is difficult for the CPU 1 to ascertain when the converted voice data VOI is written to the output buffer 14. Thus, cut-out can suddenly occur during audio reproduction.